Replace Variable ODBC module
With the Replace Variable ODBC (Open Database Connectivity) module, the value of an interview (see Interview input module, Interview Selection Module) or zone OCR variable (see Zone OCR, Barcode, QRCode module) can be replaced by a value read from an allocation table. The allocation table is available as an external data source.
It is also possible to fill a new variable with the value read from the allocation table, see also Variables.
If the contents of the allocation table are to be entered directly in the module without an external source, use Replace Variable module.

The module can occur several times in the workflow.
It can only replace variables that are already defined in an interview module or a zone OCR module.
Zone OCR, Barcode, QRCode module

The placement of the module is not restricted. However, different effects result depending on at which points the module is used.
Note that the source variable used to find the reference value is already filled in (e.g. by the zone OCR module) when this module is run through.

The module can be connected to all modules (this can result in nonsensical workflows).
The variable replacement must be done before the module in which the output of the variable value is used.

No restrictive modules.

The ODBC connection settings depend on the driver for the ODBC data source (and its version). They can differ quite considerably. The page https://www.connectionstrings.com can be of help with this.
Please note that reading from files via ODBC is not recommended. The ODBC driver is not part of IQ4docs support.

Specify the variable to be replaced. Variables created in the workflow (e.g. by the modules below) can be selected from the drop-down list. If you have not selected the variable from the drop-down list, be sure to use the correct notation (e.g. VariableName). For manually entered variables, a corresponding note appears in the dialog.
The name of the variable must not contain special characters. Allowed are small and capital letters (no umlauts or similar), numbers and the dot ".".
If the variable name is used in several places, all places can influence the variable value.

Enter the driver-specific connection string here. Specify it in one line with no line separation. Example:
-
Driver={SQL Server Native Client 11.0};Server=myServerAddress;Database=myDataBase;Uid=myUsername;Pwd=myPassword;

The syntax of the SQL statement also depends strongly on the connection string used. Specify variables in the usual notation %VariableName%. Example:
-
Select name from lookup table where Nr=’%OCRZone.epaDocType%'.

You can check the ODBC connection by using a valid SQL statement and specifying actual values for variables used. The results are provided separated with | (if there is only one result, the value is output followed by the | character). Example:
- Select name from table where No.='005'

Set Values Not Found: If this option is enabled, the value specified under Fixed Value is set as the new value if no suitable entry was found for the old value in the allocation table. If this case occurs and this option is not enabled, the old value is retained.
Create New Variable: If this option is active, the new value is written to the variable specified in the Name field for the new variable (e.g. NewVariable). The value of the variable selected as the variable to be replaced then remains unchanged. If no new value is set (e.g., because the old value was not found in the allocation table), the variable is undefined. The newly created variable can be replaced again in another module for variable replacement.


The WorkflowService knows all information about a workflow (created in the Workflow Editor). It ensures that the process is adhered to and forwards information to the subsequent modules or their services in the workflow. Its log file is Logs\WorkflowService.log.